import request from '@/utils/request'

// 佣金统计
// export function getBonusTotal(query) {
//   return request({
//     url: '/cashWithdrawal/selCount',
//     method: 'get',
//     params: query
//   })
// }

export function getBonusTotal(query) {
  return request({
    url: '/memberBonu/selCount',
    method: 'get',
    params: query
  })
}

export function getBonusList(data, query) {
  return request({
    url: '/memberBonu/getmenberBonus?current=' + query.current + "&size=" + query.size,
    method: 'post',
    data: data
  })
}

//提现佣金查询记录
export function selCashWithdrawal(query) {
  return request({
    url: '/admin/user/userWithdraw/list',
    method: 'get',
    query: query
  })
}

//提现手续费查询
export function getCommissionProportion() {
  return request({
    url: '/admin/user/userWithdraw/getInfo',
    method: 'get'
  })
}
//修改提现手续费
export function updateServiceCharge(data) {
  return request({
    url: '/admin/user/userWithdraw/updateInfo',
    method: 'put',
    data: data
  })
}

//修改提现收货地址
export function updateupdateInfo(data) {
  return request({
    url: '/admin/user/userRecharge/updateInfo',
    method: 'put',
    data: data
  })
}





//提现佣金查询记录
export function userRechargegetInfo(query) {
  return request({
    url: '/admin/user/userRecharge/getInfo',
    method: 'get',
    query: query
  })
}

//提现审核 /cashWithdrawal/auditCommission

export function auditCommission(data) {
  return request({
    url: '/admin/user/userWithdraw/audit',
    method: 'put',
    data: data
  })
}

//转账查询记录

export function selTransferRecords(data, query) {
  return request({
    url: '/transferRecord/selTransferRecords?current=' + query.current + "&size=" + query.size + "&userId=" + data.userId +
      "&payeeUserId=" + data.payeeUserId + "&applyForBeginTime=" + data.applyForBeginTime + "&applyForEndTime=" + data.applyForEndTime,
    method: 'get',
    // data: data
  })
}

//提现手续费查询
export function selTransferRecord() {
  return request({
    url: '/serviceCharge/selTransferRecord',
    method: 'get'
  })
}
//修改提现手续费
export function upTransferRecord(data) {
  return request({
    url: '/serviceCharge/upTransferRecord',
    method: 'put',
    data: data
  })
}

//银行卡

export function selBankById(query) {
  return request({
    url: '/userBank/selBankById',
    method: 'get',
    params: query
  })
}
//导出提现数据
export function exprotBanks(data) {
  return request({
    url: '/exportFile/exprotBanks',
    method: 'post',
    data: data,
    responseType: "blob", // 表明返回服务器返回的数据类型
  })
}


export function getServiceChargeInfo() {
  return request({
    url: '/admin/sysBanner/list',
    method: 'get'
  })
}

export function getWithdrawList(query) {
  return request({
    url: '/admin/sysBanner/list',
    method: 'get',
    params: query
  })
}

export function auditWithdraw(data) {
  return request({
    url: '/admin/user/updateUserInfo',
    method: 'put',
    data: data
  })
}

export function userRechargelist(query) {
  return request({
    url: '/admin/user/userRecharge/list',
    method: 'get',
    params: query
  })
}


//充值审核 /cashWithdrawal/auditCommission

export function audituserRecharge(data) {
  return request({
    url: '/admin/user/userRecharge/audit',
    method: 'put',
    data: data
  })
}

